package com.arpa.oms.domain.dto;

import com.alibaba.fastjson.annotation.JSONField;
import com.arpa.wms.domain.entity.BasicEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * OMS采购单Dto
 * </p>
 *
 * @author LEO
 * @since 2020-10-22
 */
@Data
@ApiModel(value = "OmsPurchaseDto对象", description = "OMS采购单Dto")
public class PurchaseDto extends BasicEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "采购单号")
    private String code;

    @ApiModelProperty(value = "来源单号")
    private String sourceCode;

    @ApiModelProperty(value = "所属机构Code")
    private String groupCode;

    @ApiModelProperty(value = "仓库")
    private String warehouseCode;

    @ApiModelProperty(value = "仓库标识集合")
    private List<String> warehouseCodes;

    @ApiModelProperty(value = "入驻商")
    private String shipmentCode;

    @ApiModelProperty(value = "入驻商")
    private String shipmentName;

    @ApiModelProperty(value = "采购类型 normal:普通采购")
    private String purchaseType;

    @ApiModelProperty(value = "供应商")
    private String supplierCode;

    @ApiModelProperty(value = "计划到货日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime gmtPlanArrival;

    @ApiModelProperty(value = "计划到货日期开始")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime gmtPlanArrivalStart;
    @ApiModelProperty(value = "计划到货日期结束")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime gmtPlanArrivalEnd;

    @ApiModelProperty(value = "计划采购数量（采购单位）")
    private BigDecimal planQuantity;

    @ApiModelProperty(value = "计划采购数量（采购单位）下线")
    private BigDecimal planQuantityStart;
    @ApiModelProperty(value = "计划采购数量（采购单位）上线")
    private BigDecimal planQuantityEnd;
    @ApiModelProperty(value = "计划采购数量（基本单位）")
    private BigDecimal planBasicQuantity;

    @ApiModelProperty(value = "实际采购数量（采购单位）")
    private BigDecimal actualQuantity;
    @ApiModelProperty(value = "实际采购数量（采购单位）下线")
    private BigDecimal actualQuantityStart;
    @ApiModelProperty(value = "实际采购数量（采购单位）上线")
    private BigDecimal actualQuantityEnd;

    @ApiModelProperty(value = "实际采购数量（基本单位）")
    private BigDecimal actualBasicQuantity;

    @ApiModelProperty(value = "付款金额")
    private BigDecimal paymentAmount;

    @ApiModelProperty(value = "欠款金额")
    private BigDecimal owedAmount;

    @ApiModelProperty(value = "状态：新增、作废、待审核、审核通过、审核不通过")
    private String status;
    @ApiModelProperty(value = "审核列表查询时参数，审核状态：PENDING: 待审核、PASS: 审核通过、NO_PASS：审核不通过")
    private String auditStatus;

    @ApiModelProperty(value = "备注")
    private String remarks;

    @ApiModelProperty(value = "第几页")
    private Integer pageNum=1;

    @ApiModelProperty(value = "每页条数")
    private Integer pageSize=10;

    @ApiModelProperty(value = "排序字段")
    private String sortField;

    @ApiModelProperty(value = "排序方式")
    private String sortType;



    @ApiModelProperty(value = "审核意见")
    private String verifyOpinion;

    @ApiModelProperty(value = "审核人")
    private String verifyBy;

    @ApiModelProperty(value = "审核人姓名")
    private String verifyName;

    @ApiModelProperty(value = "审核时间上线")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime gmtVerifyStart;
    @ApiModelProperty(value = "审核时间上线")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime gmtVerifyEnd;

    @ApiModelProperty(hidden = true)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime gmtVerify;

    @ApiModelProperty(value = "退货数量(基本单位)")
    private BigDecimal refundBasicQuantity;

    @ApiModelProperty(value = "退货数量(采购单位)")
    private BigDecimal refundQuantity;

    @ApiModelProperty(value = "已使用付款金额，用于批次生成付款明细时，计算已使用的付款金额数量")
    private BigDecimal usePaymentAmount;

    @ApiModelProperty(value = "付款金额上限")
    private BigDecimal paymentAmountStart;

    @ApiModelProperty(value = "付款金额下限")
    private BigDecimal paymentAmountEnd;

    @ApiModelProperty(value = "欠款金额上限")
    private BigDecimal owedAmountStart;

    @ApiModelProperty(value = "欠款金额下限")
    private BigDecimal owedAmountEnd;

}
